mirror of
https://github.com/libraryaddict/LibsDisguises.git
synced 2024-11-18 11:16:08 +01:00
Set the miscDisguise id and data
This commit is contained in:
parent
e3ca6c5b74
commit
6bfa4b3d66
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user