Skip to content
This repository has been archived by the owner on Oct 17, 2020. It is now read-only.

Fixes in player skin/model and command-line arg handling. #303

Merged
merged 7 commits into from Nov 10, 2014

Conversation

mstefarov
Copy link
Collaborator

User-visible changes:

  • Fix: All known issues with CHANGE_MODEL packet and player skins fixed.
  • Fix: Client crashed on startup if 4 or 5 command-line arguments were given. Arguments 5 (skinServer) and 6 (fullscreen) were supposed to be optional, but weren't.
  • Fix: Sheep models were being rendered without fur.
  • New: Client can now understand direct-connect URLs in command line. There are now three ways to launch the client:
    • Singleplayer: java -jar client.jar
    • Multiplayer A: java -jar client.jar directConnectLink [skinServerUrl [fullscreen?]]
    • Multiplayer B: java -jar client.jar serverIP port username mppass [skinServerUrl [fullscreen?]]

Other changes:

  • Player and NetworkPlayer classes now both derive from HumanoidMob, which hosts shared rendering code and skin/model changing API.
  • Removed most serialVersionUID variables. Since we no longer use raw Java serialization for save games (and never will), those are unneeded. They should be kept for exceptions though -- those should always be serializable.
  • Fixed SkinDownloadThread not logging errors properly.
  • When SET_BLOCK_PERMISSIONS packet is received, block names are now logged instead of IDs.
  • Added constants for all mob texture names to Textures.
  • Cleanup and optimization in Level.java. Switched from using an ArrayList to ArrayDeque for tickList.
  • Got rid of ability to render humanoid mobs with armor, which was apparently possible in survivaltest.

New skin API:

  • HumanoidMob.setSkin(String) Sets player's skin. Can accept usernames (skin will be downloaded from location of Minecraft.skinServer). Can also accept absolute URLs, as long as they begin with "http://" or "https://" and end with ".png" (case-insensitive). Can also accept null or empty strings (which act exactly like resetSkin()).
    • NOTE: If modelName is an integer (i.e. is a block model), given skin will be ignored.
    • NOTE: If modelName is not "humanoid", only absolute URLs will be accepted.
    • NOTE: Does not block -- skins are downloaded asynchronously by SkinDownloadThread.
  • HumanoidMob.resetSkin() Replaces current skin with the default texture for current model. Same as calling setSkin(null).
  • HumanoidMob.getSkinName() Gets the name of the current skin. Can be 'null' (meaning 'use default').
  • HumanoidMob.reloadSkin() Causes current skin to be re-downloaded (if any is set). Does not block.
  • HumanoidMob.setSkinImage(String,BufferedImage) Called by SkinDownloadThread to pass the downloaded image. Only uses the image if skinName has not changed since download started. You should probably just use setSkin(String) and not touch this one.

New model API:

  • HumanoidMob.setModel(String) Sets model name. newName must not be null. Removes any non-standard skin. For humanoid skins, setSkin() should be called with the player's name afterwards, otherwise default humanoid skin (char.png) will be used.
  • Mob.getModelName() Returns current model name. Will not be null.

…oth derive from HumanoidMob, which has the new functions for changing models and skins.
…rialization for save games (and never will), those are unneeded.
… for all mob texture names. Fixed SkinDownloadThread not logging errors properly. A few smaller fixes.
… multiplayer games with direct-connect URL:

  java -jar client.jar directConnectLink [skinServerUrl [fullscreen?]]
For example:
  java -jar client.jar mc://123.45.67.89:25565/fragmer/ http://www.classicube.net/static/skins/ false
NOTE: got rid of ability to render humanoid mobs with armor, which was apparently possible in survivaltest. Or something.
Known issue: sheep fur does not render properly.
mstefarov added a commit that referenced this pull request Nov 10, 2014
Fixes in player skin/model and command-line arg handling.
@mstefarov mstefarov merged commit b315317 into andrewphorn:master Nov 10, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant