Fix crash when opening Skin manager

This commit is contained in:
Matthew Messinger 2016-05-13 00:26:46 -04:00
parent 4d59f6c0d6
commit 5ca99920c7
3 changed files with 35 additions and 5 deletions

View file

@ -82,7 +82,7 @@ processResources {
}
dependencies {
factory 'org.spongepowered:mixin:0.5.3-SNAPSHOT'
factory 'org.spongepowered:mixin:0.5.5-SNAPSHOT'
}
processor {
options.reobfSrgFile = project.tasks.genSrgs.mcpToSrg.path

View file

@ -6,6 +6,7 @@ import java.io.IOException;
import javax.imageio.ImageIO;
import com.google.common.collect.Iterables;
import com.mojang.authlib.GameProfile;
import com.voxelmodpack.hdskins.HDSkinManager;
import com.voxelmodpack.hdskins.ImageBufferDownloadHD;
@ -15,11 +16,14 @@ import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.texture.DynamicTexture;
import net.minecraft.client.renderer.texture.TextureManager;
import net.minecraft.client.resources.DefaultPlayerSkin;
import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.inventory.EntityEquipmentSlot;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumHandSide;
import net.minecraft.util.ResourceLocation;
import net.minecraft.world.World;
public class EntityPlayerModel extends EntityLiving {
public class EntityPlayerModel extends EntityLivingBase {
public static final ResourceLocation NOSKIN = new ResourceLocation("hdskins", "textures/mob/noskin.png");
private PreviewTexture remoteSkinTexture;
private ResourceLocation remoteSkinResource;
@ -127,4 +131,30 @@ public class EntityPlayerModel extends EntityLiving {
this.swingProgress = this.swingProgressInt / 8.0F;
}
@Override
public EnumHandSide getPrimaryHand() {
return Minecraft.getMinecraft().gameSettings.mainHand;
}
@Override
public int getBrightnessForRender(float partialTicks) {
return 1;
}
@Override
public Iterable<ItemStack> getArmorInventoryList() {
return Iterables.cycle(null, null, null, null);
}
@Override
public ItemStack getItemStackFromSlot(EntityEquipmentSlot slotIn) {
return null;
}
@Override
public void setItemStackToSlot(EntityEquipmentSlot slotIn, ItemStack stack) {
}
}

View file

@ -6,11 +6,11 @@ import org.lwjgl.opengl.GL11;
import net.minecraft.client.Minecraft;
import net.minecraft.client.model.ModelPlayer;
import net.minecraft.client.renderer.entity.RenderLiving;
import net.minecraft.client.renderer.entity.RenderLivingBase;
import net.minecraft.client.renderer.entity.RenderManager;
import net.minecraft.util.ResourceLocation;
public class RenderPlayerModel<M extends EntityPlayerModel> extends RenderLiving<M> {
public class RenderPlayerModel<M extends EntityPlayerModel> extends RenderLivingBase<M> {
public RenderPlayerModel(RenderManager renderer) {
super(renderer, new ModelPlayer(0, false), 0.0F);