Fix flight and skins' bimap crash

This commit is contained in:
Matthew Messinger 2015-08-11 14:31:03 -04:00
parent 1dc6f0a99b
commit 963a5e5a73
4 changed files with 10 additions and 10 deletions

View file

@ -348,6 +348,8 @@ public class Pony {
return pegasusFlying = false;
} else if (isJumping) {
return true;
} else if (onGround) {
return false;
} else {
boolean falling = fallDistance > 0;
boolean levitating = fallDistance == this.previousFallDistance;

View file

@ -64,7 +64,6 @@ public class pm_Human extends ModelPony {
return true;
}
@Override
public void renderDrop(RenderManager rendermanager, ItemRenderer itemrenderer, EntityLivingBase entity) {
this.renderDrop(itemrenderer, entity, this.bipedRightArm, 1.0F, -0.0625F, 0.4375F, 0.0625F);

View file

@ -3,7 +3,6 @@ package com.voxelmodpack.hdskins;
import java.io.File;
import java.io.IOException;
import java.util.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
@ -13,8 +12,7 @@ import org.apache.commons.io.FileUtils;
import org.apache.commons.io.FilenameUtils;
import com.google.common.cache.Cache;
import com.google.common.collect.BiMap;
import com.google.common.collect.HashBiMap;
import com.google.common.collect.Maps;
import com.mojang.authlib.GameProfile;
import com.mojang.authlib.minecraft.InsecureTextureException;
import com.mojang.authlib.minecraft.MinecraftProfileTexture;
@ -39,8 +37,8 @@ public final class HDSkinManager {
private static String gatewayUrl = "skinmanager.voxelmodpack.com";
private static String skinUrl = "skins.voxelmodpack.com";
private static Cache<GameProfile, Map<Type, MinecraftProfileTexture>> skinsCache;
private static final BiMap<String, String> playerHashes = HashBiMap.create();
private static final Map<String, Map<Type, MinecraftProfileTexture>> cachedTextures = new HashMap<String, Map<Type, MinecraftProfileTexture>>();
private static final Map<String, String> playerHashes = Maps.newHashMap();
private static final Map<String, Map<Type, MinecraftProfileTexture>> cachedTextures = Maps.newHashMap();
public static void onDownloadSkin(EventInfo<ThreadDownloadImageData> e) {
ThreadDownloadImageData imageDownload = e.getSource();
@ -116,15 +114,16 @@ public final class HDSkinManager {
}
private static String findUUID(GameProfile profile, Map<?, MinecraftProfileTexture> textures, String hash) {
String uuid = playerHashes.get(hash);
for (MinecraftProfileTexture texture : textures.values()) {
if (hash.equals(texture.getHash())) {
String uuid = trimUUID(profile.getId());
uuid = trimUUID(profile.getId());
playerHashes.put(hash, uuid);
break;
}
}
return uuid;
}
}
return null;
}
private static void storeTexturesForProfile(GameProfile profile, Map<Type, MinecraftProfileTexture> textures) {
Map<?, ?> cached = getCachedTexturesForId(trimUUID(profile.getId()));

View file

@ -2,7 +2,7 @@
"name": "minelp",
"mcversion": "1.8",
"version": "1.8-UNOFFICIAL",
"revision": "185.16",
"revision": "185.18",
"author": "Verdana, Rene_Z, Mumfrey, JoyJoy",
"voxelCommonJarName": "voxelcommon-2.4.0.jar",
"classTransformerClasses": "com.minelittlepony.minelp.transformers.RenderPlayerTransformer",