Set the miscDisguise id and data

This commit is contained in:
libraryaddict 2014-06-06 13:59:22 +12:00
parent e3ca6c5b74
commit 6bfa4b3d66
2 changed files with 7 additions and 4 deletions

@ -47,13 +47,16 @@ public class MiscDisguise extends TargetedDisguise {
+ " instead"); + " instead");
} }
createDisguise(disguiseType); createDisguise(disguiseType);
this.id = getType().getDefaultId();
this.data = getType().getEntityId();
switch (disguiseType) { switch (disguiseType) {
// The only disguises which should use a custom data. // The only disguises which should use a custom data.
case PAINTING: case PAINTING:
((PaintingWatcher) getWatcher()).setArt(Art.values()[Math.max(0, firstParam) % Art.values().length]); ((PaintingWatcher) getWatcher()).setArt(Art.values()[Math.max(0, firstParam) % Art.values().length]);
break; break;
case FALLING_BLOCK: case FALLING_BLOCK:
((FallingBlockWatcher) getWatcher()).setBlock(new ItemStack(Math.max(1, firstParam), 1, (short) Math.max(0, secondParam))); ((FallingBlockWatcher) getWatcher()).setBlock(new ItemStack(Math.max(1, firstParam), 1, (short) Math.max(0,
secondParam)));
break; break;
case SPLASH_POTION: case SPLASH_POTION:
((SplashPotionWatcher) getWatcher()).setPotionId(Math.max(0, firstParam)); ((SplashPotionWatcher) getWatcher()).setPotionId(Math.max(0, firstParam));

@ -109,9 +109,9 @@ public class PlayerDisguise extends TargetedDisguise {
} }
} }
}; };
WrappedGameProfile obj = DisguiseUtilities.getProfileFromMojang(this.skinToUse, currentLookup); WrappedGameProfile gameProfile = DisguiseUtilities.getProfileFromMojang(this.skinToUse, currentLookup);
if (obj != null) { if (gameProfile != null) {
setSkin(obj); setSkin(gameProfile);
} }
} }
} }