Jump to content

Agravaine

Members
  • Posts

    33
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am new!

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Agravaine's Achievements

Tree Puncher

Tree Puncher (2/8)

1

Reputation

  1. Thanks, bro! I'm not using names. I just need to get the inventory by name (in the command). But how to get the UUID by name without the player? I do so: Map<String, UUID> players = flipMap(UsernameCache.getMap()); UUID uuid = players.get(name); It is right?
  2. @SideOnly(Side.CLIENT) public static BufferedImage getPlayerSkinAsBufferedImage(AbstractClientPlayer player){ Minecraft mc = Minecraft.getMinecraft(); String playerName = player.getCommandSenderName(); Map<Type, MinecraftProfileTexture> map = mc.func_152342_ad().func_152788_a(player.getGameProfile()); BufferedImage image = null; InputStream stream = null; ITextureObject skin; try{ if(map.containsKey(MinecraftProfileTexture.Type.SKIN)){ ResourceLocation loc = mc.func_152342_ad().func_152792_a(map.get(Type.SKIN), Type.SKIN); skin = mc.getTextureManager().getTexture(loc); }else{ skin = mc.getTextureManager().getTexture(player.getLocationSkin()); } if(skin instanceof ThreadDownloadImageData){ ThreadDownloadImageData imageData = (ThreadDownloadImageData)skin; image = ObfuscationReflectionHelper.getPrivateValue(ThreadDownloadImageData.class, imageData, "field_110560_d", "bufferedImage"); System.out.println("1"); }else if(skin instanceof DynamicTexture){ DynamicTexture imageData = (DynamicTexture)skin; int width = ObfuscationReflectionHelper.getPrivateValue(DynamicTexture.class, imageData, "field_94233_j", "width"); int height = ObfuscationReflectionHelper.getPrivateValue(DynamicTexture.class, imageData, "field_94234_k", "height"); image = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB); image.setRGB(0, 0, width, height, imageData.getTextureData(), 0, width); System.out.println("2"); }else{ stream = mc.getResourceManager().getResource(AbstractClientPlayer.locationStevePng).getInputStream(); image = ImageIO.read(stream); System.out.println("3"); } }catch(IOException e){ e.printStackTrace(); }finally{ IOUtils.closeQuietly(stream); } return image; } I took the skin and made me change. As it is now loaded back?
  3. No, I do not want to upload to minecraft.net. I want to make a character editor (change the eyes, hair, clothes, etc.) directly in the game.
  4. How to get the player skin as BufferedImage, change it a few pixels and upload back to the player?
  5. Add level up hook and change experience for next level.
  6. Hello. I am create transformer, it works. But the usual mod will not work at all. He just will not load. Help, please.
  7. Use Main Menu API: http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/2404643-main-menu-api-custom-main-menu
  8. public boolean hitEntity(ItemStack stack, EntityLivingBase target, EntityLivingBase attacker){ target.hurtTime = 0; stack.damageItem(1, attacker); return true; }
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.