diff --git a/src/main/java/vazkii/botania/common/item/equipment/bauble/ItemFlightTiara.java b/src/main/java/vazkii/botania/common/item/equipment/bauble/ItemFlightTiara.java index 413f5cde1..856f19eae 100644 --- a/src/main/java/vazkii/botania/common/item/equipment/bauble/ItemFlightTiara.java +++ b/src/main/java/vazkii/botania/common/item/equipment/bauble/ItemFlightTiara.java @@ -86,7 +86,9 @@ public class ItemFlightTiara extends ItemBauble implements IManaUsingItem, IBaub private static final int MAX_FLY_TIME = 1200; private static final int SUBTYPES = 8; - public static final int WING_TYPES = 9; + public static final int WING_TYPES = SUBTYPES; + + private static final String SPECIAL_AWESOME_HASH = "16E1BDFD1D6AE1A954C9C5E1B2D9099780F3E1724541F1F2F77310B769CFFBAC"; public ItemFlightTiara() { super(LibItemNames.FLIGHT_TIARA); @@ -116,43 +118,23 @@ public class ItemFlightTiara extends ItemBauble implements IManaUsingItem, IBaub @Override public void onEquipped(ItemStack stack, EntityLivingBase player) { super.onEquipped(stack, player); - if(stack.getItemDamage() != WING_TYPES && hash(stack.getDisplayName()).equals("16E1BDFD1D6AE1A954C9C5E1B2D9099780F3E1724541F1F2F77310B769CFFBAC")) { - stack.setItemDamage(WING_TYPES); - stack.getTagCompound().removeTag("display"); - } +// if(stack.getItemDamage() != WING_TYPES && hash(stack.getDisplayName()).equals(SPECIAL_AWESOME_HASH)) { +// stack.setItemDamage(WING_TYPES); +// stack.getTagCompound().removeTag("display"); +// } XXX disabled easter egg } String hash(String str) { if(str != null) try { MessageDigest md = MessageDigest.getInstance("SHA-256"); - return new HexBinaryAdapter().marshal(md.digest(salt(str).getBytes())); + return new HexBinaryAdapter().marshal(md.digest(str.getBytes())); } catch (NoSuchAlgorithmException e) { e.printStackTrace(); } return ""; } - // Might as well be called sugar given it's not secure at all :D - String salt(String str) { - str = str + "wowsuchsaltmuchsecurityverywow"; - SecureRandom rand = new SecureRandom(str.getBytes()); - int l = str.length(); - int steps = rand.nextInt(l); - char[] chrs = str.toCharArray(); - for(int i = 0; i < steps; i++) { - int indA = rand.nextInt(l); - int indB; - do { - indB = rand.nextInt(l); - } while(indB == indA); - char c = (char) (chrs[indA] ^ chrs[indB]); - chrs[indA] = c; - } - - return String.copyValueOf(chrs); - } - @Override public void onWornTick(ItemStack stack, EntityLivingBase player) { super.onWornTick(stack, player); @@ -409,14 +391,14 @@ public class ItemFlightTiara extends ItemBauble implements IManaUsingItem, IBaub h = 0.1F; break; } - case 9 : { // The One - OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, lightmapX, lightmapY); - rz = 180F; - rx = 0F; - s = 1.5F; - h = 1.2F; - GlStateManager.color(1F, 1F, 1F, 0.5F + (flying ? (float) Math.cos((double) (player.ticksExisted + partialTicks) * 0.3F) * 0.25F + 0.25F : 0F)); - } +// case 9 : { XXX disabled easter egg +// OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, lightmapX, lightmapY); +// rz = 180F; +// rx = 0F; +// s = 1.5F; +// h = 1.2F; +// GlStateManager.color(1F, 1F, 1F, 0.5F + (flying ? (float) Math.cos((double) (player.ticksExisted + partialTicks) * 0.3F) * 0.25F + 0.25F : 0F)); +// } } // account for padding in the texture diff --git a/src/main/resources/assets/botania/textures/items/flightTiara9.png b/src/main/resources/assets/botania/textures/items/flightTiara9.png deleted file mode 100644 index 727759e5e..000000000 Binary files a/src/main/resources/assets/botania/textures/items/flightTiara9.png and /dev/null differ diff --git a/src/main/resources/assets/botania/textures/items/flightTiara9.png.mcmeta b/src/main/resources/assets/botania/textures/items/flightTiara9.png.mcmeta deleted file mode 100644 index 349719fd5..000000000 --- a/src/main/resources/assets/botania/textures/items/flightTiara9.png.mcmeta +++ /dev/null @@ -1,7 +0,0 @@ -{ - "animation":{ - "width":60, - "height":60, - "frametime":4 - } -} \ No newline at end of file